{% extends "common/layout_main.html" %}
{% block content %}
<div class="row  border-bottom">
    <div class="col-lg-12">
        <div class="tab_title">
            <ul class="nav nav-pills">
                <li class="current">
                    <a href="{{ url_for('account_page.index') }}"><i class="fa fa-angle-double-left fa-lg" aria-hidden="true"></i> 账户列表</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="row m-t">
	<div class="col-lg-12">
        <div class="row">
            <div class="col-lg-12">
                <div class="m-b-md">
					<a class="btn btn-outline btn-primary pull-right" href="{{ url_for('account_page.edit') }}">
                        <i class="fa fa-pencil"></i>编辑
                    </a>
					<h2>账户信息</h2>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-2 text-center">
                <img class="img-circle circle-border" src="/static/images/user/{{ user.avatar }}" width="100px" height="100px">
            </div>
            <div class="col-lg-10" style="font-size:16px;">
                <p class="m-t">账号：{{ user.login_name }}</p>
                <p>昵称：{{ user.nickname }}</p>
                <p>性别：{% if user.sex == 1 %}男{% else %}女{% endif %}</p>
                <p>手机：{{ user.mobile }}</p>
                <p>邮箱：{{ user.email }}</p>
                <p>状态：
                {% if user.status == 1 %}
                    <span class="text-success">正常</span>
                {% else %}
                    <span class="text-danger">已删除</span>
                {% endif %}
                </p>
            </div>
        </div>
        <div class="row m-t">
            <div class="col-lg-12">
                <div class="panel blank-panel">
                    <div class="panel-heading">
                        <div class="panel-options">
                            <ul class="nav nav-tabs">
                                <li class="active">
                                    <a href="javascript:void(0);" data-toggle="tab" aria-expanded="false">访问记录</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="panel-body">
                        <div class="tab-content">
                            <div class="tab-pane active">
                                <table class="table table-bordered">
                                    <thead>
                                        <tr>
                                            <th>访问时间</th>
                                            <th>访问Url</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    {% if log_list %}
                                       {% for log in log_list %}
                                        <tr>
                                            <td>{{ log.created_time }}</td>
                                            <td>{{ log.target_url }}</td>
                                        </tr>
                                       {% endfor %}
                                    {% else %}
									<tr><td colspan="2">暂无数据</td></tr>
                                    {% endif %}
                                     </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
	</div>
</div>
{% endblock %}
